

class Flight(object):

    def __init__(self, name):
        # self.name = name
        # self.__food = None
        self.flight_name = name


    def checking_status(self):
        print('正在查看%s航班状态' % self.flight_name)
        return 2

    @property
    def flight_status(self):
        status = self.checking_status()
        if status == 0:
            print('飞机取消')
        elif status ==1:
            print('飞机待机')
        elif status ==2:
            print('飞机起飞')


f = Flight('CA980')
f.flight_status



#     @property
#     def eat(self):
#         print('property',self.__food)
#         print('%s吃吃吃：%s,' % (self.name, self.__food))
#         return
#
#     @eat.setter
#     def eat(self, food):
#         print('设置吃%s'% food)
#         self.__food = food
#         print('setter', self.__food)
#
# s =Flight('hahaha')
# s.eat = '粑粑'
# s.eat